package liangtWorkSpace.springAll.di.privateAble;

import liangtWorkSpace.springAll.di.privateAble.Editory.TextEditor;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author liangt
 * @ClassName: SetterMain
 * @title: SetterMain
 * @projectName liangtWorkSpace.springAll.di.setter
 * @description: 演示依赖注入setter注入
 * @date 2020/10/15 18:13
 */
public class PrivateAbleMain {
    public static void main(String[] args) {
        String xmlPath = "DI/privateAble/Beans.xml";
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext(xmlPath);

        TextEditor textEditor = (TextEditor) applicationContext.getBean("textEditor");
        textEditor.spellCheck();
    }
}
